import http from '@/plugins/aixos'

export function addManyTower(data: TowerModel[]) {
  return http.request<TowerModel[]>({
    url: '/tower/addMany',
    method: 'POST',
    data,
  })
}

export function findAllTower(args: Record<string, any>) {
  const url =
    '/tower?' +
    Object.entries(args)
      .map(([key, value]) => `${key}=${value}`)
      .join('&')
  return http.request<TowerModel[]>({
    url,
    method: 'GET',
  })
}

export function delManyTower(id: number) {
  return http.request({
    url: `/tower/delMany/${id}`,
    method: 'DELETE',
  })
}
